using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using BVMB.DataLayer.BusinessObjects;
using BVMB.DataLayer.Base;

namespace BVMB.DataLayer.ManagerObjects
{
    public partial interface IPhieuDatVeManager : IManagerBase<BVMB.DataLayer.BusinessObjects.PhieuDatVe, int>
    {
		// Get Methods
		IList<PhieuDatVe> GetByMaVeChuyenBay(System.Int32 ve);
    }

    partial class PhieuDatVeManager : ManagerBase<BVMB.DataLayer.BusinessObjects.PhieuDatVe, int>, IPhieuDatVeManager
    {
		#region Constructors
		
		public PhieuDatVeManager() : base()
        {
        }
        public PhieuDatVeManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<PhieuDatVe> GetByMaVeChuyenBay(System.Int32 ve)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(PhieuDatVe));
			
			
			ICriteria veCriteria = criteria.CreateCriteria("Ve");
            veCriteria.Add(NHibernate.Criterion.Expression.Eq("Id", ve));
			
			return criteria.List<PhieuDatVe>();
        }
		
		#endregion
    }
}